On Patrol
Here we combine ideas from the HelloWorld.jl and LetsGetMoving.jl examples to simulate T-Cells patrolling through a dense layer of epithelial cells.
Start by loading in the CellularPotts.jl package and creating a space where cells can exist.
using CellularPotts
space = CellSpace(200,200)200×200 Periodic 8-Neighbor CellSpace{2,Int64}Initialize a new CellTable with 75 epithelial cells and 5 T-Cells
initialCellState = CellTable(
[:Epithelial, :TCell],
[500, 400],
[75, 5]);Note that for the MigrationPenalty we set the epithelial cell's scaling factor to zero. This effectively removes this penalty from the cell type.
penalties = [
AdhesionPenalty([0 30 30;
30 30 30
30 30 30]),
VolumePenalty([10,10]),
MigrationPenalty(50, [0,50], size(space))
]3-element Vector{Penalty}:
AdhesionPenalty([0 30 30; 30 30 30; 30 30 30])
VolumePenalty([0, 10, 10])
MigrationPenalty(50, [0, 0, 50], sparse(Int64[], Int64[], Int64[], 200, 200))Create a new CellPotts model.
cpm = CellPotts(space, initialCellState, penalties)Cell Potts Model:
Grid: 200×200
Cell Counts: [Epithelial → 75] [TCell → 5] [Total → 80]
Model Penalties: Adhesion Migration Volume
Temperature: 20.0
Steps: 0Record the simulation
recordCPM("OnPatrol.gif", cpm)This page was generated using Literate.jl.